<!--thymeleaf 前置和命名空间-->
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>查看员工</h1>
    <ul>
        <li><a th:href="@{/}">首页</a></li>

        <div th:if="${result.code == 200}">
            <table>
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>部门</th>
                    <th>请选择</th>
                </tr>
                <tr th:each="e,s : ${result.data}">
                    <td th:text="${s.count}"></td>
                    <td th:text="${e.name}"></td>
                    <td th:text="${e.dept.name}"></td>
                    <td>
                        <a th:href="@{/emp/{id}(id=${e.id})}">查询</a>
                        <a th:href="@{/emp/remove/{id}(id=${e.id})}">删除</a>
                        <a th:href="@{/emp/modify_emp/{id}(id=${e.id})}">修改数据</a>
                    </td>
                </tr>
            </table>
        </div>
    </ul>
</body>
</html>